package com.xesj.controller;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;

import com.alibaba.fastjson.JSONArray;
import com.xesj.model.Page;
import com.xesj.model.User;
import com.xesj.service.UserServiceI;
import com.xesj.util.PageData;

/**
 * 
* @ClassName : UserController 
* @Description : TODO 
* @author : hnk
* @date : 2018年5月18日 下午4:08:38 
*
 */
@Controller
@RequestMapping("userController")
public class UserController extends BaseController{
	@Autowired
	private UserServiceI userService;
	
	
	@RequestMapping("memberList")
	public ModelAndView selectMemberList(Page page){
		 ModelAndView mv = this.getModelAndView();
		 PageData pd=new PageData();
		 ArrayList<User> userList=userService.selectMemberList(page);
		 mv.addObject("userList",userList);
		 mv.setViewName("member/memberlist");
		 return mv;		
	}
	
	
	@RequestMapping("/updateMember")
	public String  updateMember(){
		PageData pd=new PageData();
		PageData result=new PageData();
		pd = getPageData();
		int count = userService.updateMember(pd);
		
		return JSONArray.toJSONString(result);
		
		
	}
	
	/**
	 * 
	* @Title : UserController.java 
	* @Package com.xesj.controller 
	* @Description : TODO
	* @author : hnk  
	* @date :2018年6月27日 上午11:29:01
	* @throws Exception 
	* @retutn : PageData
	* @version
	 */
	@RequestMapping("excleInputMember")
	public PageData excleInputMember(MultipartFile file){
		 ModelAndView mv = this.getModelAndView();
		 PageData result=new PageData();
		
		 return result;		
	}
	
	

}
